import type { BaseType } from "../type/BaseType";
import { reactive } from "vue";
export default function useDialog(){
    //定义弹框属性
    const dialog = reactive<BaseType>({
        title:"",
        width:630,
        height:280,
        visible:false
    });
    const onShow = () =>{
        dialog.visible=true
    }
    const onClose = () =>{
        dialog.visible=false
    }
    const onConfirm = () =>{
        dialog.visible=false
    }
    return{
        dialog,
        onShow,
        onClose,
        onConfirm
    }

}